/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pipeline;

import baseObjects.Symbol;
import java.math.BigInteger;

/**
 *
 * @author weiss
 */
public class permutatorsPersistant {

    private Symbol[] zone1;
    private BigInteger Z1counter;
    private Symbol[] zone2;
    private BigInteger Z2counter;
    private Symbol[] zone3;
    private BigInteger Z3counter;
    private Symbol[] zone4;
    private BigInteger Z4counter;
    private Symbol[] zone5;
    private BigInteger Z5counter;
    private Symbol[] zone6;
    private BigInteger Z6counter;
    private Permuter perm_zone1;
    private Permuter perm_zone2;
    private Permuter perm_zone3;
    private Permuter perm_zone4;
    private Permuter perm_zone5;
    private Permuter perm_zone6;
    private BigInteger keyCandiID;

    public BigInteger getKeyCandiID() {
        return keyCandiID;
    }

  
    permutatorsPersistant(BigInteger currentID,
            Permuter<Symbol> pzone1, Permuter<Symbol> pzone2, Permuter<Symbol> pzone3, Permuter<Symbol> pzone4,
            Permuter<Symbol> pzone5, Permuter<Symbol> pzone6) {
        this.keyCandiID = currentID;
        perm_zone1 = pzone1;
        perm_zone2 = pzone2;
        perm_zone3 = pzone3;
        perm_zone4 = pzone4;
        perm_zone5 = pzone5;
        perm_zone6 = pzone6;
    }
    public Symbol[] getZone1() {
        return zone1;
    }

    public Symbol[] getZone2() {
        return zone2;
    }

    public Symbol[] getZone3() {
        return zone3;
    }

    public Symbol[] getZone4() {
        return zone4;
    }

    public Symbol[] getZone5() {
        return zone5;
    }

    public Symbol[] getZone6() {
        return zone6;
    }

    public Permuter getPerm_zone1() {
        return perm_zone1;
    }

    public Permuter getPerm_zone2() {
        return initPermutator(perm_zone2);
    }

    private Permuter initPermutator(Permuter p){
        return (p.getNumLeft().equals(BigInteger.ZERO)?new Permuter(p.getElements()):p);
    }

    public Permuter getPerm_zone3() {
        return initPermutator(perm_zone3);
    }

    public Permuter getPerm_zone4() {
        return initPermutator(perm_zone4);
    }

    public Permuter getPerm_zone5() {
        return initPermutator(perm_zone5);
    }

    public Permuter getPerm_zone6() {
        return initPermutator(perm_zone6);
    }

    
}
